/**
 * Created by Administrator on 2017\9\18 0018.
 */
import React from 'react';
import template from './../../commonui/template';
import { Link } from 'react-router-dom';
import { Form, Input, Tooltip, Icon, Cascader, Select, Row, Col, Checkbox, Button, AutoComplete } from 'antd';
const Search = Input.Search;
const FormItem=Form.Item;
import UsrHeader from './UsrHeader';
import Institution from './Istitution';
import  './../../css/User/Organation.css';

class Orgination extends React.Component{
    constructor(props){
        super(props);
        this.state={
             user: this.props.location.state&&this.props.location.state.user,
            lb:this.props.location.state&&this.props.location.state.lb
        }
        this.drawInstitution=this.drawInstitution.bind(this);

    }
    drawInstitution(){
        /******ajax获取机构数据*****/
        let data=[{
             Name:'PK Institutions',
             Address:'PK Institutions address',
             Phone:'025-1124356',
             WorkTime:'8:00AM-18:00PM',
             Poster:'PK Institutions Logo'
        },{
            Name:'UK Institutions',
             Address:'UK Institutions address',
             Phone:'025-1124356',
             WorkTime:'8:00AM-18:00PM',
             Poster:'UK Institutions Logo'
        }];
        let Instions=data.map((options,index)=>{
            return <Institution  info = {options}/>
        })
        return Instions;
    }
    render(){
        return(
            <div>
                <UsrHeader info={this.state} />
                <div className="Org">
                    <div>
                        <h3>Drive Health Check Designated Institution</h3>
                    </div>
                    <div>
                        {this.drawInstitution()}
                    </div>
                </div>
            </div>
        )
    }
}

export default template({
    id: 'UsrOrgination',
    component: Orgination
});

